import request from '@/utils/request'

// 查询商品评价详情列表
export function listCompassGoodsEva(query) {
    return request({
        url: '/system/CompassGoodsEva/list',
        method: 'get',
        params: query
    })
}

// 查询商品评价详情详细
export function getCompassGoodsEva(id) {
    return request({
        url: '/system/CompassGoodsEva/' + id,
        method: 'get'
    })
}

// 查询商品评价详情详细
export function updateGoodsChosenFlag(data) {
  return request({
    url: `/system/CompassGoodsEva/updateChosenFlag/${data.id}/${data.flag}`,
    method: 'post',
    data: data
  })
}

// 新增商品评价详情
export function addCompassGoodsEva(data) {
    return request({
        url: '/system/CompassGoodsEva',
        method: 'post',
        data: data
    })
}

// 修改商品评价详情
export function updateCompassGoodsEva(data) {
    return request({
        url: '/system/CompassGoodsEva',
        method: 'put',
        data: data
    })
}

// 删除商品评价详情
export function delCompassGoodsEva(id) {
    return request({
        url: '/system/CompassGoodsEva/' + id,
        method: 'delete'
    })
}

// 导出商品评价详情
export function exportCompassGoodsEva(query) {
    return request({
        url: '/system/CompassGoodsEva/export',
        method: 'get',
        params: query
    })
}
